package com.github.cyf.databaseLock;

/**
 * @author chenyifan
 * @create 2024-07-11 14:40
 */
public interface ILock {

    /**
     * 尝试获取锁
     *
     * @param key 锁定的 key
     * @return
     */
    Locker acquire(String key);

    /**
     * 释放锁
     *
     * @param locker
     * @return
     */
    boolean release(Locker locker);
}
